<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>公告信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		function showInfo(view){
			$("#descInfo").val(view);
			$('#finalUserModal').modal("show");//打开模态框
		}
	</script>
</head>
<body>
		<!-- 分配最终用户设置DIV -->
		<div id="finalUserModal" style="width:400px;" class="modal hide fade" tabindex="-1" role="dialog"  aria-hidden="false">
		  <div class="modal-header">
		    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
		    <h3 id="myModalLabel">公告详情</h3>
		  </div>
			<div class="controls" style="margin-left: 5px;margin-top:10px;margin-bottom: 10px;">
					<textarea id="descInfo"  style="width:375px;" readonly="readonly" htmlEscape="false" rows="4" class="input-xxlarge"></textarea>
			</div>
		  <div class="modal-footer">
		    <button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>&nbsp;
		  </div>
		</div>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/sys/noticeInfo/list">公告信息列表</a></li>
		<shiro:hasPermission name="sys:noticeInfo:save"><li><a href="${ctx}/sys/noticeInfo/openSave">公告信息添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="noticeInfo" action="${ctx}/sys/noticeInfo/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>名称：</label>
				<form:input path="names" htmlEscape="false" maxlength="15" class="input-medium"/>
			</li>
			<li class="btns">
				<a id="btnSubmit" class="btn btn-primary" onclick="return page();"><i class="icon-search"></i>&nbsp;查询</a>
			</li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>标题</th>
				<th>状态</th>
				<th>创建时间</th>
				<th>修改时间</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<c:choose>
			<c:when test="${not empty page.list}">
				<c:forEach items="${page.list}" var="noticeInfo">
					<tr>
						<td>
									${noticeInfo.names}
						</td>
						<td>
								${fns:getDictLabel(noticeInfo.delFlag, 'del_flag', '')}
						</td>
						<td>
							<fmt:formatDate value="${noticeInfo.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
						</td>

						<td>
							<fmt:formatDate value="${noticeInfo.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
						</td>
						<td>
							<a title="详情" href="#" onclick="showInfo('${noticeInfo.describes}')" class="btn-link"><i class="icon-comment-alt"></i></a>&nbsp;</a>
							<shiro:hasPermission name="sys:noticeInfo:update">
							<a title="编辑" href="${ctx}/sys/noticeInfo/openUpdate?id=${noticeInfo.id}" class="btn-link"><i class="icon-pencil"></i></a>&nbsp;</a>
							</shiro:hasPermission>
							<shiro:hasPermission name="sys:noticeInfo:delete">
							<a title="删除" href="${ctx}/sys/noticeInfo/delete?id=${noticeInfo.id}" onclick="return confirmx('确认要删除该公告信息吗？', this.href)" class="btn-link"><i class="icon-trash"></i></a>
							</shiro:hasPermission>
						</td>
					</tr>
				</c:forEach>
			</c:when>
			<c:otherwise>
				<tr>
					<td colspan="8" style="text-align: center;font-size:17px; font-family:SimHei">未查询到数据...</td>
				</tr>
			</c:otherwise>
			</c:choose>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>